package com.zzl.finance.data.entity.feign;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 供应商授信额度表,即集团给供应商的额度
 *
 * @author sunpp
 * @date 2022-02-16 14:04:04
 */
@Data
@TableName("t_supplier_credit")
@ApidocModel
@SuppressWarnings("javadoc")
public class SupplierCreditEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键")
    private String id;
    @ApidocModelProperty(description = "授信总额度")
    private Double creditAllAmount;
    @ApidocModelProperty(description = "剩余授信金额")
    private Double creditSurplusAmount;
    @ApidocModelProperty(description = "接收企业id")
    private String receiveEnterpriseId;
    @ApidocModelProperty(description = "冻结总额度")
    private Double creditFrozenAmount;
    @ApidocModelProperty(description = "可用授信额度")
    private Double creditAvailableAmount;
    @ApidocModelProperty(description = "已用授信额度")
    private Double creditUsedAmount;
    @ApidocModelProperty(description = "排序编号")
    private Integer sortNum;
    @ApidocModelProperty(description = "授信企业id")
    private String creditEnterpriseId;
    @ApidocModelProperty(description = "金融机构id")
    private String institutyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String institutyName;
    @ApidocModelProperty(description = "授信企业名称")
    private String creditEnterpriseName;
    @ApidocModelProperty(description = "接收企业名称")
    private String receiveEnterpriseName;
    @ApidocModelProperty(description = "状态：1 最新数据，0 历史数据")
    private Integer supplierCreditStatus;
    @ApidocModelProperty(description = "额度使用类别 1：开立 2 融资")
    private Integer creditUseType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;
    @ApidocModelProperty(description = "额度编号")
    private String creditNo;
    @ApidocModelProperty(description = "生效日期")
    private Date effectTime;
    @ApidocModelProperty(description = "失效日期")
    private Date expireTime;
    @ApidocModelProperty(description = "冻结金额/平台操作的锁定额度")
    private Double creditLockAmount;
    @ApidocModelProperty(description = "授信状态  1未生效 2生效 3已失效 4冻结")
    private Integer creditStatus;
    @ApidocModelProperty(description = "是否冻结 0 未冻结 1 已冻结")
    private Integer lockStatus;

}
